#include <iostream>
#include "Button.h"

int Button::s_cnt = 0;
Button *Button::s_btnPtr = NULL;

Button::Button()
{
	std::cout << "Create Button " << std::endl;
}

Button::~Button()
{
	std::cout << "Destroy Button " << std::endl;
}

Button * Button::createBtn()
{
	if (s_btnPtr == NULL) {
		s_btnPtr = new Button();
	}
	s_cnt++;
	return s_btnPtr;
}

void Button::releaseBtn()
{
	s_cnt--;
	if (s_cnt <= 0 && s_btnPtr != NULL) {
		delete s_btnPtr;
	}
}

void Button::setText(wchar_t * txt)
{

}
